/* SPDX-License-Identifier: GPL-2.0 */

#ifndef EULEROS_DIM_CORE_SIG_H
#define EULEROS_DIM_CORE_SIG_H

#include <linux/fs.h>

/**
 * dim_sig_init() - init signature resource
 *
 * Returns: 0 on success or errno on failure
 */
int dim_sig_init(void);

/**
 * dim_sig_uninit() - free signature resource
 */
void dim_sig_uninit(void);

/**
 * dim_sig_verify() - verify signature
 *
 * @buf: pointer to content need to be verified
 * @buf_len: length of content need to be verified
 * @sbuf: pointer to signature
 * @sbuf_len: length to signature
 *
 * Returns: 0 on success or errno on failure
 */
int dim_sig_verify(const char *buf,
		   loff_t buf_len,
		   const char *sbuf,
		   loff_t sbuf_len);

#endif
